<template>
  <el-container>
  <el-card class="box-card" style="margin: 50px auto; width: 600px;height: 200px">
    <div slot="header" style="margin: 10px 20px">
      <span style="text-align: center">遇见属于你的漂流瓶</span>
    </div>
    <el-divider />
    <el-button size="default" type="text" @click="load" style="margin: auto">打捞漂流瓶</el-button>

    <el-dialog
        title="打捞到一个漂流瓶!"
        v-model="dialogVisible"
        style="width:600px;height:600px;line-height: 50px"
        text-align:center>
      <el-divider />

        <el-descriptions size="large" title="漂流瓶">
          <div>
            <el-descriptions-item label="标题">{{ title }}</el-descriptions-item>//data.title
          </div>
        </el-descriptions>
        <el-descriptions>
          <div>
            <el-descriptions-item label="发布人">{{ user }}</el-descriptions-item>
          </div>
        </el-descriptions>
        <el-descriptions>
          <div>
            <el-descriptions-item label="内容">{{ content }}</el-descriptions-item>
          </div>
        </el-descriptions>


    </el-dialog>

  </el-card>
  </el-container>
</template>

<script>
import Pagination from "./Pagination.vue";

export default {
  name: "GetBottle",
  components: {Pagination},
  data() {
    return {
      data: {},
      title:"你好",
      content:"hello world",
      user:"参商",
      dialogVisible: false,
      formLabelWidth: '120px',
      value: null
    };
  },
  methods: {
    handleClose(done) {
      this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {
          });
    },
    load() {
      this.dialogVisible = true
      /*this.rq.get("bottle").then(res => {
        if (res.code === '200') {
          this.data = res.data
        } else {
          this.$message.error(res.msg)
        }
      }).catch((err) => {
        this.$message.error("未知错误")
      })*/
    }
  }
}
</script>

<style scoped>

</style>
